package com.cblz.bd.common.core.entity.system;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Tree<T> {

    private Integer id;

    private String name;

    private List<Tree<T>> children;

    private Integer pid;

    public void initChildren() {
        this.children = new ArrayList<>();
    }

}
